import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../components/Login.vue'
import Puser from '../components/adminpage/Puser.vue'
import Guser from '../components/adminpage/Guser.vue'
import Zfuser from '../components/adminpage/Zfuser.vue'
import Xtuser from '../components/adminpage/Xtuser.vue'
import Welcome from '../components/Welcome.vue'
import Register from '../components/Register.vue'
import Venues from '../components/welcomepage/Venues.vue'
import Frist from '../components/welcomepage/Frist.vue'
import Managements from '../components/welcomepage/Managements.vue'
import Xtguser from '../components/xtuserpage/Xtguser.vue'
import Xtmangement from '../components/xtuserpage/Xtmangement.vue'
import Xtpuser from '../components/xtuserpage/Xtpuser.vue'
import Xtvenue from '../components/xtuserpage/Xtvenue.vue'
import Xtzfuser from '../components/xtuserpage/Xtzfuser.vue'
import Xtuserfrist from '../components/xtuserpage/Xtuserfrist.vue'
import Xtownuser from '../components/xtuserpage/Xtownuser.vue'
import Zfuserfrist from '../components/zfuserpage/Zfuserfrist.vue'
import Zfguser from '../components/zfuserpage/Zfguser.vue'
import Zfmangement from '../components/zfuserpage/Zfmangement.vue'
import Zfpuser from '../components/zfuserpage/Zfpuser.vue'
import Zfvenue from '../components/zfuserpage/Zfvenue.vue'
import Zfownuser from '../components/zfuserpage/Zfownuser.vue'
import Pownuser from '../components/puserpage/Pownuser.vue'
import Porder from '../components/puserpage/Porder.vue'
import Pmanagements from '../components/puserpage/Pmanagements.vue'
import Pvenues from '../components/puserpage/Pvenues.vue'
import Gmangement from '../components/guserpage/Gmangement.vue'
import Gvenue from '../components/guserpage/Gvenue.vue'
import Guserfrist from '../components/guserpage/Guserfrist.vue'
import Gownuser from '../components/guserpage/Gownuser.vue'
import Map from '../components/mapserve/map.vue'
import Pmap from '../components/puserpage/Pmap.vue'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    { path: '/', redirect: '/welcome' },
    { path: '/login', component: Login },
    { path: '/register', component: Register },
    { path: '/welcome', component: Welcome,
        children: [
          { path: '/welcome', redirect: '/frist' },
          { path: '/venues', component: Venues },
          { path: '/frist', component: Frist },
          { path: '/managements', component: Managements },
          { path: '/map', component: Map }
        ]},
    { path: '/puser', component: Puser,
        children:[
          { path: '/puser', redirect: '/pvenues' },
          { path: '/pownuser', component: Pownuser },
          { path: '/porder', component: Porder },
          { path: '/pmanagements', component: Pmanagements },
          { path: '/pvenues', component: Pvenues },
          { path: '/pmap', component: Pmap }
        ] },
    { path: '/guser', component: Guser,
          children:[
          { path: '/guser', redirect: '/guserfrist' },
          { path: '/gmangement', component: Gmangement,name:'管理单位' },
          { path: '/gvenue', component: Gvenue,name:'场馆' },
          { path: '/guserfrist', component: Guserfrist },
          { path: '/gownuser', component: Gownuser,name:'个人中心' }
          ] },
    { path: '/zfuser', component: Zfuser,
        children:[
          { path: '/zfuser', redirect: '/Zfuserfrist' },
          { path: '/Zfuserfrist', component: Zfuserfrist },
          { path: '/Zfguser', component: Zfguser,name:'管理者' },
          { path: '/Zfmangement', component: Zfmangement,name:'管理单位' },
          { path: '/Zfpuser', component: Zfpuser,name:'普通用户' },
          { path: '/Zfvenue', component: Zfvenue,name:'场馆' },
          { path: '/Zfownuser', component: Zfownuser,name:'个人中心' }
        ] },
    { path: '/xtuser', component: Xtuser,
        children: [
          { path: '/xtuser', redirect: '/xtuserfrist' },
          { path: '/xtguser', component: Xtguser,name:'管理者' },
          { path: '/xtmangement', component: Xtmangement,name:'管理单位' },
          { path: '/xtpuser', component: Xtpuser,name:'普通用户' },
          { path: '/xtvenue', component: Xtvenue,name:'场馆' },
          { path: '/xtzfuser', component: Xtzfuser,name:'政府超级管理员' },
          { path: '/xtuserfrist', component: Xtuserfrist },
          { path: '/xtownuser', component: Xtownuser,name:'个人中心' }
        ]
  }
    
  ]
})

export default router
